package com.scgl.suppliers.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scgl.suppliers.mapper.SuppliersTypeMapper;
import com.scgl.suppliers.domain.SuppliersType;
import com.scgl.suppliers.service.ISuppliersTypeService;

/**
 * 分类Service业务层处理
 *
 * @author mobai
 * @date 2024-10-29
 */
@Service
public class SuppliersTypeServiceImpl implements ISuppliersTypeService
{
    @Autowired
    private SuppliersTypeMapper suppliersTypeMapper;

    /**
     * 查询分类
     *
     * @param id 分类主键
     * @return 分类
     */
    @Override
    public SuppliersType selectSuppliersTypeById(Long id)
    {
        return suppliersTypeMapper.selectSuppliersTypeById(id);
    }

    /**
     * 查询分类列表
     *
     * @param suppliersType 分类
     * @return 分类
     */
    @Override
    public List<SuppliersType> selectSuppliersTypeList(SuppliersType suppliersType)
    {
        return suppliersTypeMapper.selectSuppliersTypeList(suppliersType);
    }

    /**
     * 新增分类
     *
     * @param suppliersType 分类
     * @return 结果
     */
    @Override
    public int insertSuppliersType(SuppliersType suppliersType)
    {
        return suppliersTypeMapper.insertSuppliersType(suppliersType);
    }

    /**
     * 修改分类
     *
     * @param suppliersType 分类
     * @return 结果
     */
    @Override
    public int updateSuppliersType(SuppliersType suppliersType)
    {
        return suppliersTypeMapper.updateSuppliersType(suppliersType);
    }

    /**
     * 批量删除分类
     *
     * @param ids 需要删除的分类主键
     * @return 结果
     */
    @Override
    public int deleteSuppliersTypeByIds(Long[] ids)
    {
        return suppliersTypeMapper.deleteSuppliersTypeByIds(ids);
    }

    /**
     * 删除分类信息
     *
     * @param id 分类主键
     * @return 结果
     */
    @Override
    public int deleteSuppliersTypeById(Long id)
    {
        return suppliersTypeMapper.deleteSuppliersTypeById(id);
    }
}
